﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using System.Text;

public partial class WoWAPI2 : System.Web.UI.Page
{
	protected override void OnInit(EventArgs e)
	{
		base.OnInit(e);
		btnGet.Click += new EventHandler(btnGet_Click);
	}
    protected void Page_Load(object sender, EventArgs e)
    {
		if (!IsPostBack)
		{
			tbURL.Text = "http://us.battle.net/api/wow/character/Doomhammer/Taunkah";
		}
    }

	void btnGet_Click(object sender, EventArgs e)
	{
		WoWAPI.API.ApplicationPublicKey = tbPublicKey.Text;
		WoWAPI.API.ApplicationSignature = tbPrivateKey.Text;
		lblResponse.Text = WoWAPI.API.MakeWebRequest(tbURL.Text);
	}
}